// Warning : If you need to use this file, include Util_utils_types.h
#ifndef __Util_UTILS_NULLPTR_H__
#define __Util_UTILS_NULLPTR_H__


namespace Util
{
    /// Null pointer
    /** A safe replacement for the NULL macro.
    */
    class Nullptr
    {
    public :

        /// Default constructor.
        Nullptr()
        {
        }

        /// Allows : "if (!pPointer)".
        bool operator ! () const
        {
            return true;
        }

        typedef void (Nullptr::*MemberFn)();
        /// Allows : "if (pPointer)".
        operator MemberFn() const
        {
            return 0;
        }

        /// Allows usage with raw pointers.
        template<class N>
        operator N*() const
        {
            return 0;
        }
    };

    //const Nullptr nullptr;
}

#endif